package cn.linstudy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class ProductServiceImpl implements ProductService {
  @Autowired
  ProductDao productDao;
  @Value("${server.port}")
  private String port;
    
  @Override
  public Product findById(Long productId) {
//    return productDao.findById(productId).get();
    Product product = productDao.findById(productId).get();
    product.setPname(product.getPname()+",data form "+port);
    return product;
  }
}
